package com.dhl.cloud.core.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dhl.cloud.common.vdo.AccessUserInfoBean;
import com.dhl.cloud.common.vdo.StudentCourseTeacherFilterBean;
import com.dhl.cloud.common.vdo.SysUserStudyBean;
import com.dhl.cloud.common.vdo.UserAccessBean;
import com.dhl.cloud.core.entity.User;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    User selectByUsername(String username);

    User selectByUsernameAndTenantid(@Param("username") String username,@Param("tenantid") String tenantid);

    User selectByPhone(String phone);

    User selectByCredentials(String credentials);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> selectByStatus(int userstatus);

    int updateList(List<User> list);

    UserAccessBean selectAccessByUsername(String username);

    AccessUserInfoBean selectBeAccessByUsername(String username);

    List<User> selectByUsernameString(String usernameString);

    int deleteByUsers(List<String> users);

    int deleteByUserName(String username);

    int updateIsDelByUserName(String username);

    List<SysUserStudyBean> getSysUserStudyHours(@Param("list") List<String> list,@Param("tenantid") String tenantid, @Param("starttime") String starttime,@Param("endtime") String endtime);

//    List<StudentSelect> getUsersByExamplanid(Integer examplanid);

    List<String> selectUsersByTeachplanid(Integer id);

    List<StudentCourseTeacherFilterBean> getTeacherFilterList(@Param("username") String username,@Param("tenantid") String tenantid,@Param("teachplanid")Integer teachplanid);

    int updateUserOnlineFlagByUsername(@Param("username") String username,@Param("isonline")Integer isonline);

    Integer getUserOnlineCount();

    List<User> getUserByUsernames(@Param("list") List<String> list);

    List<User> selectAll();

    int updateIsDelByUserNames(List<String> users);

    int insertBatch(@Param("list")List<User> list);

    User selectByOpenId(String openId);
}